package com.itheima.service;

import org.apache.servicecomb.provider.springmvc.reference.RestTemplateBuilder;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

@Service
public class ConsumerService {

    private final RestTemplate restTemplate = RestTemplateBuilder.create();

    public String sayRest(String name){
        String rtnValue = restTemplate.getForObject("cse://"+"providerTest3"+"/provider/hello?name="+name, String.class);
        return rtnValue;
    }
}
